package com.oesf.newanimation;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class MainActivity extends Activity {
	ImageView image;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		image = (ImageView) findViewById (R.id.imageView1);
	}

	public void onClickAnim(View v) {
		Animation anime = AnimationUtils.loadAnimation(this, R.anim.anim);
		image.startAnimation(anime);
	}
	
	public void onClickAnim2(View v) {
		Animation anime = AnimationUtils.loadAnimation(this, R.anim.anim2);
		image.startAnimation(anime);
}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
}
